<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div>
    <img src="images/1.jpg" title="火锅">
    <button>选择</button>
  </div>
</body>

</html>
<script>
  var btn = document.querySelector('button') //获取button元素
  var img = document.querySelector('img')
  btn.onclick = function () {
    img.src = 'images/selected.jpg'
  }
</script>